package com.ymttest.database.mapping;

import com.ymttest.database.model.GodProductActivityStock;
import com.ymttest.database.model.GodProductActivityStockExample;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.type.JdbcType;

public interface GodProductActivityStockMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table God_ProductActivityStock
     *
     * @mbggenerated Fri Aug 14 10:53:20 CST 2020
     */
    @Insert({
        "insert into God_ProductActivityStock (sProductActivityStockID, sProductID, ",
        "iStoreType, sCatalogID, ",
        "sSKU, iActivityID, ",
        "iStockNum, iAction, ",
        "dAddTime, dUpdateTime, ",
        "iProductInActivityId, dBeginTime, ",
        "dEndTime, iLockGroupStock, ",
        "fActivityPrice, SellerId, ",
        "ActivityType, SourceId, ",
        "Earnest, EarnestDedution, ",
        "StockType, DataVersion)",
        "values (#{sProductActivityStockID,jdbcType=VARCHAR}, #{sProductID,jdbcType=VARCHAR}, ",
        "#{iStoreType,jdbcType=INTEGER}, #{sCatalogID,jdbcType=VARCHAR}, ",
        "#{sSKU,jdbcType=VARCHAR}, #{iActivityID,jdbcType=INTEGER}, ",
        "#{iStockNum,jdbcType=INTEGER}, #{iAction,jdbcType=INTEGER}, ",
        "#{dAddTime,jdbcType=TIMESTAMP}, #{dUpdateTime,jdbcType=TIMESTAMP}, ",
        "#{iProductInActivityId,jdbcType=INTEGER}, #{dBeginTime,jdbcType=TIMESTAMP}, ",
        "#{dEndTime,jdbcType=TIMESTAMP}, #{iLockGroupStock,jdbcType=INTEGER}, ",
        "#{fActivityPrice,jdbcType=DECIMAL}, #{sellerId,jdbcType=INTEGER}, ",
        "#{activityType,jdbcType=INTEGER}, #{sourceId,jdbcType=INTEGER}, ",
        "#{earnest,jdbcType=DECIMAL}, #{earnestDedution,jdbcType=DECIMAL}, ",
        "#{stockType,jdbcType=INTEGER}, #{dataVersion,jdbcType=BINARY})"
    })
    int insert(GodProductActivityStock record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table God_ProductActivityStock
     *
     * @mbggenerated Fri Aug 14 10:53:20 CST 2020
     */
    @InsertProvider(type=GodProductActivityStockSqlProvider.class, method="insertSelective")
    int insertSelective(GodProductActivityStock record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table God_ProductActivityStock
     *
     * @mbggenerated Fri Aug 14 10:53:20 CST 2020
     */
    @SelectProvider(type=GodProductActivityStockSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="sProductActivityStockID", property="sProductActivityStockID", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="sProductID", property="sProductID", jdbcType=JdbcType.VARCHAR),
        @Result(column="iStoreType", property="iStoreType", jdbcType=JdbcType.INTEGER),
        @Result(column="sCatalogID", property="sCatalogID", jdbcType=JdbcType.VARCHAR),
        @Result(column="sSKU", property="sSKU", jdbcType=JdbcType.VARCHAR),
        @Result(column="iActivityID", property="iActivityID", jdbcType=JdbcType.INTEGER),
        @Result(column="iStockNum", property="iStockNum", jdbcType=JdbcType.INTEGER),
        @Result(column="iAction", property="iAction", jdbcType=JdbcType.INTEGER),
        @Result(column="dAddTime", property="dAddTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dUpdateTime", property="dUpdateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iProductInActivityId", property="iProductInActivityId", jdbcType=JdbcType.INTEGER),
        @Result(column="dBeginTime", property="dBeginTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dEndTime", property="dEndTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iLockGroupStock", property="iLockGroupStock", jdbcType=JdbcType.INTEGER),
        @Result(column="fActivityPrice", property="fActivityPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER),
        @Result(column="ActivityType", property="activityType", jdbcType=JdbcType.INTEGER),
        @Result(column="SourceId", property="sourceId", jdbcType=JdbcType.INTEGER),
        @Result(column="Earnest", property="earnest", jdbcType=JdbcType.DECIMAL),
        @Result(column="EarnestDedution", property="earnestDedution", jdbcType=JdbcType.DECIMAL),
        @Result(column="StockType", property="stockType", jdbcType=JdbcType.INTEGER),
        @Result(column="DataVersion", property="dataVersion", jdbcType=JdbcType.BINARY)
    })
    List<GodProductActivityStock> selectByExampleWithBLOBs(GodProductActivityStockExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table God_ProductActivityStock
     *
     * @mbggenerated Fri Aug 14 10:53:20 CST 2020
     */
    @SelectProvider(type=GodProductActivityStockSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="sProductActivityStockID", property="sProductActivityStockID", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="sProductID", property="sProductID", jdbcType=JdbcType.VARCHAR),
        @Result(column="iStoreType", property="iStoreType", jdbcType=JdbcType.INTEGER),
        @Result(column="sCatalogID", property="sCatalogID", jdbcType=JdbcType.VARCHAR),
        @Result(column="sSKU", property="sSKU", jdbcType=JdbcType.VARCHAR),
        @Result(column="iActivityID", property="iActivityID", jdbcType=JdbcType.INTEGER),
        @Result(column="iStockNum", property="iStockNum", jdbcType=JdbcType.INTEGER),
        @Result(column="iAction", property="iAction", jdbcType=JdbcType.INTEGER),
        @Result(column="dAddTime", property="dAddTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dUpdateTime", property="dUpdateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iProductInActivityId", property="iProductInActivityId", jdbcType=JdbcType.INTEGER),
        @Result(column="dBeginTime", property="dBeginTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dEndTime", property="dEndTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iLockGroupStock", property="iLockGroupStock", jdbcType=JdbcType.INTEGER),
        @Result(column="fActivityPrice", property="fActivityPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER),
        @Result(column="ActivityType", property="activityType", jdbcType=JdbcType.INTEGER),
        @Result(column="SourceId", property="sourceId", jdbcType=JdbcType.INTEGER),
        @Result(column="Earnest", property="earnest", jdbcType=JdbcType.DECIMAL),
        @Result(column="EarnestDedution", property="earnestDedution", jdbcType=JdbcType.DECIMAL),
        @Result(column="StockType", property="stockType", jdbcType=JdbcType.INTEGER)
    })
    List<GodProductActivityStock> selectByExample(GodProductActivityStockExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table God_ProductActivityStock
     *
     * @mbggenerated Fri Aug 14 10:53:20 CST 2020
     */
    @Select({
        "select",
        "sProductActivityStockID, sProductID, iStoreType, sCatalogID, sSKU, iActivityID, ",
        "iStockNum, iAction, dAddTime, dUpdateTime, iProductInActivityId, dBeginTime, ",
        "dEndTime, iLockGroupStock, fActivityPrice, SellerId, ActivityType, SourceId, ",
        "Earnest, EarnestDedution, StockType, DataVersion",
        "from God_ProductActivityStock",
        "where sProductActivityStockID = #{sProductActivityStockID,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="sProductActivityStockID", property="sProductActivityStockID", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="sProductID", property="sProductID", jdbcType=JdbcType.VARCHAR),
        @Result(column="iStoreType", property="iStoreType", jdbcType=JdbcType.INTEGER),
        @Result(column="sCatalogID", property="sCatalogID", jdbcType=JdbcType.VARCHAR),
        @Result(column="sSKU", property="sSKU", jdbcType=JdbcType.VARCHAR),
        @Result(column="iActivityID", property="iActivityID", jdbcType=JdbcType.INTEGER),
        @Result(column="iStockNum", property="iStockNum", jdbcType=JdbcType.INTEGER),
        @Result(column="iAction", property="iAction", jdbcType=JdbcType.INTEGER),
        @Result(column="dAddTime", property="dAddTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dUpdateTime", property="dUpdateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iProductInActivityId", property="iProductInActivityId", jdbcType=JdbcType.INTEGER),
        @Result(column="dBeginTime", property="dBeginTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dEndTime", property="dEndTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iLockGroupStock", property="iLockGroupStock", jdbcType=JdbcType.INTEGER),
        @Result(column="fActivityPrice", property="fActivityPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER),
        @Result(column="ActivityType", property="activityType", jdbcType=JdbcType.INTEGER),
        @Result(column="SourceId", property="sourceId", jdbcType=JdbcType.INTEGER),
        @Result(column="Earnest", property="earnest", jdbcType=JdbcType.DECIMAL),
        @Result(column="EarnestDedution", property="earnestDedution", jdbcType=JdbcType.DECIMAL),
        @Result(column="StockType", property="stockType", jdbcType=JdbcType.INTEGER),
        @Result(column="DataVersion", property="dataVersion", jdbcType=JdbcType.BINARY)
    })
    GodProductActivityStock selectByPrimaryKey(String sProductActivityStockID);
    
    
    
    @Select({
        "select",
        "sProductActivityStockID, sProductID, iStoreType, sCatalogID, sSKU, iActivityID, ",
        "iStockNum, iAction, dAddTime, dUpdateTime, iProductInActivityId, dBeginTime, ",
        "dEndTime, iLockGroupStock, fActivityPrice, SellerId, ActivityType, SourceId, ",
        "Earnest, EarnestDedution, StockType, DataVersion",
        "from God_ProductActivityStock",
        "where sProductID = #{sProductID,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="sProductActivityStockID", property="sProductActivityStockID", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="sProductID", property="sProductID", jdbcType=JdbcType.VARCHAR),
        @Result(column="iStoreType", property="iStoreType", jdbcType=JdbcType.INTEGER),
        @Result(column="sCatalogID", property="sCatalogID", jdbcType=JdbcType.VARCHAR),
        @Result(column="sSKU", property="sSKU", jdbcType=JdbcType.VARCHAR),
        @Result(column="iActivityID", property="iActivityID", jdbcType=JdbcType.INTEGER),
        @Result(column="iStockNum", property="iStockNum", jdbcType=JdbcType.INTEGER),
        @Result(column="iAction", property="iAction", jdbcType=JdbcType.INTEGER),
        @Result(column="dAddTime", property="dAddTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dUpdateTime", property="dUpdateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iProductInActivityId", property="iProductInActivityId", jdbcType=JdbcType.INTEGER),
        @Result(column="dBeginTime", property="dBeginTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dEndTime", property="dEndTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iLockGroupStock", property="iLockGroupStock", jdbcType=JdbcType.INTEGER),
        @Result(column="fActivityPrice", property="fActivityPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER),
        @Result(column="ActivityType", property="activityType", jdbcType=JdbcType.INTEGER),
        @Result(column="SourceId", property="sourceId", jdbcType=JdbcType.INTEGER),
        @Result(column="Earnest", property="earnest", jdbcType=JdbcType.DECIMAL),
        @Result(column="EarnestDedution", property="earnestDedution", jdbcType=JdbcType.DECIMAL),
        @Result(column="StockType", property="stockType", jdbcType=JdbcType.INTEGER),
        @Result(column="DataVersion", property="dataVersion", jdbcType=JdbcType.BINARY)
    })
    GodProductActivityStock selectByProductId(String sProductID);
    
    
    @Select({
        "select",
        "sProductActivityStockID, sProductID, iStoreType, sCatalogID, sSKU, iActivityID, ",
        "iStockNum, iAction, dAddTime, dUpdateTime, iProductInActivityId, dBeginTime, ",
        "dEndTime, iLockGroupStock, fActivityPrice, SellerId, ActivityType, SourceId, ",
        "Earnest, EarnestDedution, StockType, DataVersion",
        "from God_ProductActivityStock",
        "where sProductID = #{sProductID,jdbcType=VARCHAR} and sCatalogID = #{sCatalogID,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="sProductActivityStockID", property="sProductActivityStockID", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="sProductID", property="sProductID", jdbcType=JdbcType.VARCHAR),
        @Result(column="iStoreType", property="iStoreType", jdbcType=JdbcType.INTEGER),
        @Result(column="sCatalogID", property="sCatalogID", jdbcType=JdbcType.VARCHAR),
        @Result(column="sSKU", property="sSKU", jdbcType=JdbcType.VARCHAR),
        @Result(column="iActivityID", property="iActivityID", jdbcType=JdbcType.INTEGER),
        @Result(column="iStockNum", property="iStockNum", jdbcType=JdbcType.INTEGER),
        @Result(column="iAction", property="iAction", jdbcType=JdbcType.INTEGER),
        @Result(column="dAddTime", property="dAddTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dUpdateTime", property="dUpdateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iProductInActivityId", property="iProductInActivityId", jdbcType=JdbcType.INTEGER),
        @Result(column="dBeginTime", property="dBeginTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dEndTime", property="dEndTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iLockGroupStock", property="iLockGroupStock", jdbcType=JdbcType.INTEGER),
        @Result(column="fActivityPrice", property="fActivityPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER),
        @Result(column="ActivityType", property="activityType", jdbcType=JdbcType.INTEGER),
        @Result(column="SourceId", property="sourceId", jdbcType=JdbcType.INTEGER),
        @Result(column="Earnest", property="earnest", jdbcType=JdbcType.DECIMAL),
        @Result(column="EarnestDedution", property="earnestDedution", jdbcType=JdbcType.DECIMAL),
        @Result(column="StockType", property="stockType", jdbcType=JdbcType.INTEGER),
        @Result(column="DataVersion", property="dataVersion", jdbcType=JdbcType.BINARY)
    })
    GodProductActivityStock selectByProductIdAndCatalogId(String sProductID,String sCatalogID);
    
    
    @Select({
        "select",
        "sProductActivityStockID, sProductID, iStoreType, sCatalogID, sSKU, iActivityID, ",
        "iStockNum, iAction, dAddTime, dUpdateTime, iProductInActivityId, dBeginTime, ",
        "dEndTime, iLockGroupStock, fActivityPrice, SellerId, ActivityType, SourceId, ",
        "Earnest, EarnestDedution, StockType, DataVersion",
        "from God_ProductActivityStock",
        "where sProductID = #{sProductID,jdbcType=VARCHAR} and iActivityID = #{iActivityID,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="sProductActivityStockID", property="sProductActivityStockID", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="sProductID", property="sProductID", jdbcType=JdbcType.VARCHAR),
        @Result(column="iStoreType", property="iStoreType", jdbcType=JdbcType.INTEGER),
        @Result(column="sCatalogID", property="sCatalogID", jdbcType=JdbcType.VARCHAR),
        @Result(column="sSKU", property="sSKU", jdbcType=JdbcType.VARCHAR),
        @Result(column="iActivityID", property="iActivityID", jdbcType=JdbcType.INTEGER),
        @Result(column="iStockNum", property="iStockNum", jdbcType=JdbcType.INTEGER),
        @Result(column="iAction", property="iAction", jdbcType=JdbcType.INTEGER),
        @Result(column="dAddTime", property="dAddTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dUpdateTime", property="dUpdateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iProductInActivityId", property="iProductInActivityId", jdbcType=JdbcType.INTEGER),
        @Result(column="dBeginTime", property="dBeginTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="dEndTime", property="dEndTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="iLockGroupStock", property="iLockGroupStock", jdbcType=JdbcType.INTEGER),
        @Result(column="fActivityPrice", property="fActivityPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER),
        @Result(column="ActivityType", property="activityType", jdbcType=JdbcType.INTEGER),
        @Result(column="SourceId", property="sourceId", jdbcType=JdbcType.INTEGER),
        @Result(column="Earnest", property="earnest", jdbcType=JdbcType.DECIMAL),
        @Result(column="EarnestDedution", property="earnestDedution", jdbcType=JdbcType.DECIMAL),
        @Result(column="StockType", property="stockType", jdbcType=JdbcType.INTEGER),
        @Result(column="DataVersion", property="dataVersion", jdbcType=JdbcType.BINARY)
    })
    GodProductActivityStock selectProductInActivityId(String sProductID,String iActivityID);
    
    
    
    
}